package com.xiaoxin.yixinai.activity.form;

import java.util.List;

import javax.annotation.Resource;
import javax.persistence.EntityManager;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.xiaoxin.yixinai._frame.base.BaseRepository;
import com.xiaoxin.yixinai._frame.base.BaseServiceProxy;

@Service
@Transactional
public class FormService extends BaseServiceProxy<Form> {
	
	@Resource
    private EntityManager em;
	
	@Resource
	private FormRepository formRepository;

	@Override
	protected BaseRepository<Form> getBaseRepository() {
		return formRepository;
	}
	
	/**
	 * 查询活动留言
	 */
	List<Form> findByActivityId(Integer activityId) {
		return formRepository.findByActivityId(activityId);
	}
	
	
}
